package components.base
{
	import mx.events.FlexEvent;
	
	import spark.components.TextInput;
	
	import interfaces.IReset;
	
	public class BaseTextInput extends TextInput implements IReset
	{
		public function BaseTextInput()
		{
			super();
			addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
		}
		
		/**
		 * 控件创建完成后调用初始化信息
		 */
		private function creationCompleteHandler(p_evt:FlexEvent):void
		{
			removeEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
			if(styleName == null)
				styleName = "textInput";
		}
		
		public function dispose():void
		{
			
		}
		
		public function reset():void
		{
			text = "";
		}
	}
}